1. Field of Art
This application relates to a system and a computer implemented method of adaptively controlling a compression rate for encoding a video.
2. Description of the Related Art
Video compression allows transmission of a large video from a server to a client device. A server compresses a video and transmits the compressed video to a client device. The client device decompresses the compressed video from the sink device, and renders the decompressed video for display to a user.
In one example, the server encodes the video by a predetermined compression rate. A video compressed according to a higher compression rate has a smaller size than a video compressed according to a lower compression rate. However, the video compressed according to the higher compression rate may suffer from more loss in the video quality than the video compressed according to the lower compression rate.
In one conventional approach, the server encodes different videos by different compression rates according to types of videos (e.g., a game, live action movie, animation, cartoon, sports, etc.). In particular, certain types of videos may be more affected by a loss of video quality than other types of videos, and these types of videos may be compressed according to a lower compression rate than compression rates for other types of videos. For example, a loss of detailed components of objects due to compression in a live action movie may be more noticeable than a loss of detailed components of objects due to compression in a cartoon or an animation. Hence, the server may compress a live action movie according to a lower compression rate than an animation or a cartoon.
Compressing each video with an assigned compression rate suffers from a few drawbacks. In one example, a video may include a first set of frames with more moving objects and a second set of frames with more stationary objects. A loss of detailed components of the moving objects may be less noticeable than a loss of detailed components of the stationary objects. Compressing the video according to a fixed compression rate may cause the first set of frames to be under-compressed. That is, the first set of frames may be compressed according to a higher compression rate than the fixed compression rate without noticeable degradation in the video quality. Moreover, compressing the video according to the fixed compression rate may cause the second set of frames to be over-compressed. That is, the second set of frames compressed according to the fixed compression rate may suffer from noticeable degradations in the video quality.
Therefore, a conventional approach of compressing a video is unable to adaptively compress different frames of the videos.